﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Collections.Generic;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class ucCenters : System.Web.UI.UserControl
{
    protected string sOutput=string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        string sURL = HttpContext.Current.Request.ServerVariables["URL"].ToString();
        if (sURL.ToLower().Contains("default.aspx"))
        {
            divTitle.Attributes.Clear();
            divTitle.InnerHtml += "<h3>Медицинские центры Израиля</h3>";
        }
        else
        {
            divTitle.InnerHtml += "<strong>Медицинские центры Израиля</strong>";
        }

        List<CategoryItem>Items= Category.ByAncestors((int)NewsType.MedicalCenters);
        
        foreach(CategoryItem Item in Items)
        {
            sOutput += string.Format("<li><a href='{0}-c.aspx'>{1}</a></li>", HttpUtility.UrlEncode(Item.cPageName), Item.cTitle);
        }
        
    }
}
